Skip to content

Conversation

@dpgrote
Copy link
Contributor

@dpgrote dpgrote commented Apr 23, 2025

This PR clarifies the use of the empty tuple index, (), for MultiFabs. Giving the empty tuple as the only index of a MultiFab will return the full array, both valid and ghost cells. This is in contrast to the Ellipsis that will return the array with only value cells.
For example

mf = MultiFab()
mf[()]  # returns valid and ghost cells
mf[...]  # returns only valid cells

Copy link
Contributor

@roelof-groenewald roelof-groenewald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

@roelof-groenewald roelof-groenewald self-assigned this Apr 23, 2025
@roelof-groenewald roelof-groenewald enabled auto-merge (squash) April 23, 2025 18:52
@EZoni
Copy link
Member

EZoni commented Apr 23, 2025

Note that #436 (plus resetting the required workflows in the repo's settings, if any workflow's name changed) may be needed here to unblock CI.

@roelof-groenewald
Copy link
Contributor

@EZoni is it okay if I assign you to this PR then since you are familiar with how to reset the necessary repo settings?

@EZoni
Copy link
Member

EZoni commented Apr 24, 2025

@roelof-groenewald

Thanks, you can assign me so I can keep track of this and make sure it does not get stalled, but unfortunately I do not have access to the settings of this repository (nor those of WarpX, FYI). I should be able to touch base tomorrow with @atmyers on #436 to see how to progress there.

@atmyers atmyers merged commit 77db770 into AMReX-Codes:development May 3, 2025
17 checks passed
@dpgrote dpgrote deleted the multifab_empty_tuple_all_axis branch May 5, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants